package com.basic.business.unIndicators.mapper;

import com.basic.business.goodsIndicators.domain.TGoodsIndicators;
import com.basic.business.unIndicators.domain.TUnboundedIndicators;
import com.basic.common.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 无界指标数据Mapper接口
 *
 * @author zhaoxy_jn@163.com
 */
public interface TUnboundedIndicatorsMapper extends BaseMapper<TUnboundedIndicators> {

    /**
     * 根据文件id删除数据
     * @param fileId
     * @return
     */
    int deleteByFileId(String fileId);

    /**
     * 批量插入数据
     * @param list
     * @return
     */
    int saveBatch(List<TUnboundedIndicators> list);

    /**
     * 批量删除旧数据
     * @param fileId 文件ID,去重删除非本文件的数据
     * @param storeId
     * @param statDate
     * @param mainBodyIdList
     * @return
     */
    int deleteOldData(@Param("fileId")String fileId, @Param("storeId")String storeId, @Param("statDate") Date statDate, @Param("mainBodyIdList")List<String> mainBodyIdList);

    /**
     * 根据商品id获取数据
     * @param mainBodyId
     * @return
     */
    List<TUnboundedIndicators> getListByMainBodyId(String mainBodyId);


    /**
     * 根据商品id删除数据
     * @param goodsList
     * @return
     */
    int deleteByGoodsId(@Param("goodsList")List<TGoodsIndicators> goodsList);
}
